package exo1;

/**
 * Created with IntelliJ IDEA.
 * User: naberrad
 * Date: 14/10/13
 * Time: 14:11
 * To change this template use File | Settings | File Templates.
 */
public class Sphere extends Shape3D {

    private double radius;

    public Sphere(double radius) {
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }


    @Override
    public double surface() {
        double s;
        s=4*Math.PI*Math.pow(radius,2);
        return s;
    }


    @Override
    public double volume() {
        double v;
        v=(4*Math.PI*Math.pow(radius,2))/3;
        return v;
    }

}
